From fec33c0b30d9325b1ce98d1f307d6a52f50c3cfb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 10 Jun 1993 23:35:18 +0000 Subject: [PATCH] (basic-save-buffer): Cal auto-save-mode with t as arg if and only if auto save was off and default is on. (set-visited-file-name): Likewise. --- lisp/files.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 047bea3c2df..9cce40b6017 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1086,7 +1086,8 @@ if you wish to pass an empty string as the argument." (setq backup-inhibited t))) ;; If auto-save was not already on, turn it on if appropriate. (if (not buffer-auto-save-file-name) - (auto-save-mode (and buffer-file-name auto-save-default)) + (and buffer-file-name auto-save-default + (auto-save-mode t)) ;; If auto save is on, start using a new name. ;; We deliberately don't rename or delete the old auto save ;; for the old visited file name. This is because perhaps @@ -1381,7 +1382,8 @@ the last real save, but optional arg FORCE non-nil means delete anyway." (setq buffer-file-name (expand-file-name (read-file-name "File to save in: ") nil) default-directory (file-name-directory buffer-file-name)) - (auto-save-mode auto-save-default))) + (and auto-save-default (not buffer-auto-save-file-name) + (auto-save-mode t)))) (or (verify-visited-file-modtime (current-buffer)) (not (file-exists-p buffer-file-name)) (yes-or-no-p -- 2.30.2